import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";

import AutoImport from "unplugin-auto-import/vite";
//import requireTransform from 'vite-plugin-require-transform';
// https://vitejs.dev/config/
export default defineConfig({
  optimizeDeps: {
    exclude: ["net"],
  },
  css: {
    preprocessorOptions: {
      less: {
        // As opposed to the global variable option, this puts the declaration at the end of your base file, meaning it will override anything defined in your Less file.
        modifyVars: {
          // @acro-design/web-vue
          // arco-image-preview-toolbar
          "@image-preview-position-toolbar-bottom": "3%",
          // arco-image-preview-arrow
          "@image-preview-arrow-position": "15%",
        },

        javascriptEnabled: true,
      },
    },
  },
  plugins: [
    vue(),
    AutoImport({
      imports: ["vue", "vue-router"],
    }),
  ],

  server: {
    proxy: {
      "/api": "",
    },
  },
});
